﻿using B.S.Database.Domain.Entity;
using B.S.Database.ErrorCode;
using B.S.Database.Interface.Interface;
using B.S.Database.Read.Api.Application.Commands.Image;
using MediatR;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace B.S.Database.Read.Api.Controllers
{
    /// <summary>
    /// 图片控制器
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class ImageController : ControllerBase
    {
        private readonly IMediator mediator;

        public ImageController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        /// <summary>
        /// 图片显示
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpGet]
        public Task<Apiresult<List<Picture_Information>>> PictureShow([FromQuery] PictureShowCommands request)
        {
            return mediator.Send(request);
    }
    }
}
